import Web3 from 'web3'
import crypto from 'crypto'

const QUICKNODE_RPC_URL ='https://bsc-dataseed.binance.org/' // BSC 主网 RPC 节点

async function main(){
    createWallet(10);
}

const initWeb3 = async () => {
  const web3 = new Web3(QUICKNODE_RPC_URL);
  return web3;
}

 const createWallet = async(num) => {
    const web3 = await initWeb3();
    for(let i=0;i<num;i++){
      const account = web3.eth.accounts.create()
      console.info(`\n地址: ${account.address}`);
      console.info(`私钥: ${account.privateKey}`);
    }
}

main();